/*
 * AudioDevice.h
 *
 *  Created on: 2009/01/31
 *      Author: Yongshik Cho
 */

#ifndef AUDIODEVICE_H_
#define AUDIODEVICE_H_

#include "core/ISingleton.h"
#include "active/Audible.h"
#include "core/Vector2D.h"
#include "device/DeviceSettings.h"


class AudioDevice : public ISingleton<AudioDevice>
{
public:
	AudioDevice(DeviceSettings* sets);
	virtual ~AudioDevice();

public:
	static AudioDevice& GetInstance()
	{
		assert(m_pInstance);
		return *m_pInstance;
	}
	static AudioDevice* GetInstancePtr()
	{
		return m_pInstance;
	}

public:
	virtual Sound* createSound(const String& p, const uint32 format, const int32 rate, void* stream) { return 0; }
	virtual void disposeSound(Sound* sound) {}
	virtual void cleanupSounds() {}
	virtual void playback(Audible* a, const Vector2D& position) {}
	virtual bool isPlaying(Audible* a) { return false; }
	virtual uint32 getPlayStatus(Audible* a) { return 0; }
	virtual void queueStream(Sound* sound, int8* cbuf, const int32 size) = 0;

};

#endif /* AUDIODEVICE_H_ */
